| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646 |
| /**
* @ngdoc directive
* @name patternfly.navigation.component:pfVerticalNavigation - Basic
* @restrict E
*
* @description
* Component for vertical navigation. This sets up the nav bar header with the collapse button (hamburger) and the
* application brand image (or text) as well as the vertical navigation bar containing the navigation items. This
* directive supports primary, secondary, and tertiary navigation with options to allow pinning of the secondary and
* tertiary navigation menus as well as the option for persistent secondary menus.
* <br><br>
* The remaining parts of the navbar header can be transcluded.
* <br><br>
* Tha navigation items are marked active based on the current location and the href value for the item. If not using
* href's on the items to navigate, set update-active-items-on-click to "true".
* <br><br>
* This directive works in conjunction with the main content container if the 'container-pf-nav-pf-vertical' class
* selector is added to the main content container.
*
* @param {string} brandSrc src for brand image
* @param {string} brandAlt Text for product name when brand image is not available
* @param {boolean} showBadges Flag if badges are used on navigation items, default: false
* @param {boolean} persistentSecondary Flag to use persistent secondary menus, default: false
* @param {boolean} hiddenIcons Flag to not show icons on the primary menu, default: false
* @param {array} items List of navigation items
* <ul style='list-style-type: none'>
* <li>.title - (string) Name of item to be displayed on the menu
* <li>.iconClass - (string) Classes for icon to be shown on the menu (ex. "fa fa-dashboard")
* <li>.href - (string) href link to navigate to on click
* <li>.children - (array) Submenu items (same structure as top level items)
* <li>.badges - (array) Badges to display for the item, badges with a zero count are not displayed.
* <ul style='list-style-type: none'>
* <li>.count - (number) Count to display in the badge
* <li>.iconClass - (string) Class to use for showing an icon before the count
* <li>.tooltip - (string) Tooltip to display for the badge
* <li>.badgeClass: - (string) Additional class(es) to add to the badge container
* </ul>
* </ul>
* @param {function} navigateCallback function(item) Callback method invoked on a navigation item click (one with no submenus)
* @param {function} itemClickCallback function(item) Callback method invoked on an item click
* @param {boolean} updateActiveItemsOnClick Flag if active items should be marked on click rather than on navigation change, default: false
* @param {boolean} ignoreMobile Flag if mobile state should be ignored (use only if absolutely necessary) default: false
*
* @example
<example module="patternfly.navigation" deps="patternfly.utils, patternfly.filters, patternfly.sort, patternfly.views">
<file name="index.html">
<div ng-controller="showDemoController">
<button class="btn btn-primary" id="showVerticalNav" ng-click="showVerticalNav()">Show Vertical Navigation</button>
<label class="example-info-text">This will display the vertical nav bar and some mock content over the content of this page.</label>
<label class="example-info-text">Exit the demo to return back to this page.</label>
</div>
<div id="verticalNavLayout" class="layout-pf layout-pf-fixed faux-layout hidden" ng-controller="vertNavController">
<pf-vertical-navigation items="navigationItems" brand-alt="ANGULAR PATTERNFLY"
show-badges="true" pinnable-menus="true" update-active-items-on-click="true"
navigate-callback="handleNavigateClick">
<div>
<ul class="nav navbar-nav">
<li><button id="hideVerticalNav" ng-click="hideVerticalNav()" class="hide-vertical-nav">Exit Vertical Navigation Demo</button></li>
</ul>
<ul class="nav navbar-nav navbar-right navbar-iconic">
<li class="dropdown">
</li>
<li class="dropdown">
<a class="dropdown-toggle nav-item-iconic" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span title="Help" class="fa pficon-help"></span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li><a href="#">Help</a></li>
<li><a href="#">About</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle nav-item-iconic" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span title="Username" class="fa pficon-user"></span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
<li><a href="#">Preferences</a></li>
<li><a href="#">Logout</a></li>
</ul>
</li>
</ul>
</div>
</pf-vertical-navigation>
<div id="contentContainer" class="container-fluid container-cards-pf container-pf-nav-pf-vertical example-page-container">
<div id="includedContent" ng-include="'add_content.html'"></div>
</div>
</div>
</file>
<file name="demo.js">
angular.module('patternfly.navigation').controller('showDemoController', ['$scope',
function ($scope) {
$scope.showVerticalNav = function () {
angular.element(document.querySelector("#verticalNavLayout")).removeClass("hidden");
};
}
]);
</file>
<file name="script.js">
angular.module('patternfly.navigation').controller('vertNavController', ['$scope',
function ($scope) {
$scope.navigationItems = [
{
title: "Dashboard",
iconClass: "fa fa-dashboard",
href: "#/dashboard"
},
{
title: "Dolor",
iconClass : "fa fa-shield",
href: "#/dolor",
badges: [
{
count: 1283,
tooltip: "Total number of items"
}
]
},
{
title: "Ipsum",
iconClass: "fa fa-space-shuttle",
children: [
{
title: "Intellegam",
children: [
{
title: "Recteque",
href: "#/ipsum/intellegam/recteque",
badges: [
{
count: 6,
tooltip: "Total number of error items",
badgeClass: 'example-error-background'
}
]
},
{
title: "Suavitate",
href: "#/ipsum/intellegam/suavitate",
badges: [
{
count: 2,
tooltip: "Total number of items"
}
]
},
{
title: "Vituperatoribus",
href: "#/ipsum/intellegam/vituperatoribus",
badges: [
{
count: 18,
tooltip: "Total number of warning items",
badgeClass: 'example-warning-background'
}
]
}
]
},
{
title: "Copiosae",
children: [
{
title: "Exerci",
href: "#/ipsum/copiosae/exerci",
badges: [
{
count: 2,
tooltip: "Total number of error items",
iconClass: 'pficon pficon-error-circle-o'
},
{
count: 6,
tooltip: "Total number warning error items",
iconClass: 'pficon pficon-warning-triangle-o'
}
]
},
{
title: "Quaeque",
href: "#/ipsum/copiosae/quaeque",
badges: [
{
count: 0,
tooltip: "Total number of error items",
iconClass: 'pficon pficon-error-circle-o'
},
{
count: 4,
tooltip: "Total number warning error items",
iconClass: 'pficon pficon-warning-triangle-o'
}
]
},
{
title: "Utroque",
href: "#/ipsum/copiosae/utroque",
badges: [
{
count: 1,
tooltip: "Total number of error items",
iconClass: 'pficon pficon-error-circle-o'
},
{
count: 2,
tooltip: "Total number warning error items",
iconClass: 'pficon pficon-warning-triangle-o'
}
]
}
]
},
{
title: "Patrioque",
children: [
{
title: "Novum",
href: "#/ipsum/patrioque/novum",
badges: [
{
count: 6,
tooltip: "Total number of error items",
badgeClass: 'example-error-background'
}
]
},
{
title: "Pericula",
href: "#/ipsum/patrioque/pericula"
},
{
title: "Gubergren",
href: "#/ipsum/patrioque/gubergren"
}
]
},
{
title: "Accumsan",
href: "#/ipsum/Accumsan",
badges: [
{
count: 2,
tooltip: "Total number of error items",
iconClass: 'pficon pficon-error-circle-o'
},
{
count: 6,
tooltip: "Total number warning error items",
iconClass: 'pficon pficon-warning-triangle-o'
}
]
}
]
},
{
title: "Amet",
iconClass: "fa fa-paper-plane",
children: [
{
title: "Detracto",
children: [
{
title: "Delicatissimi",
href: "#/amet/detracto/delicatissimi",
badges: [
{
count: 6,
tooltip: "Total number of error items",
badgeClass: 'example-error-background'
}
]
},
{
title: "Aliquam",
href: "#/amet/detracto/aliquam",
badges: [
{
count: 2,
tooltip: "Total number of items"
}
]
},
{
title: "Principes",
href: "#/amet/detracto/principes",
badges: [
{
count: 18,
tooltip: "Total number of warning items",
badgeClass: 'example-warning-background'
}
]
}
]
},
{
title: "Mediocrem",
children: [
{
title: "Convenire",
href: "#/amet/mediocrem/convenire",
badges: [
{
count: 6,
tooltip: "Total number of error items",
badgeClass: 'example-error-background'
}
]
},
{
title: "Nonumy",
href: "#/amet/mediocrem/nonumy",
badges: [
{
count: 2,
tooltip: "Total number of items"
}
]
},
{
title: "Deserunt",
href: "#/amet/mediocrem/deserunt",
badges: [
{
count: 18,
tooltip: "Total number of warning items",
badgeClass: 'example-warning-background'
}
]
}
]
},
{
title: "Corrumpit",
children: [
{
title: "Aeque",
href: "#/amet/corrumpit/aeque",
badges: [
{
count: 6,
tooltip: "Total number of error items",
badgeClass: 'example-error-background'
}
]
},
{
title: "Delenit",
href: "#/amet/corrumpit/delenit",
badges: [
{
count: 2,
tooltip: "Total number of items"
}
]
},
{
title: "Qualisque",
href: "#/amet/corrumpit/qualisque",
badges: [
{
count: 18,
tooltip: "Total number of warning items",
badgeClass: 'example-warning-background'
}
]
}
]
},
{
title: "Urbanitas",
href: "#/amet/urbanitas",
badges: [
{
count: 2,
tooltip: "Total number of error items",
iconClass: 'pficon pficon-error-circle-o'
},
{
count: 6,
tooltip: "Total number warning error items",
iconClass: 'pficon pficon-warning-triangle-o'
}
]
}
]
},
{
title: "Adipscing",
iconClass: "fa fa-graduation-cap",
href: "#/adipscing"
},
{
title: "Lorem",
iconClass: "fa fa-gamepad",
href: "#/lorem"
},
{
title: "Exit Demo"
}
];
$scope.hideVerticalNav = function () {
angular.element(document.querySelector("#verticalNavLayout")).addClass("hidden");
};
$scope.handleNavigateClick = function (item) {
if (item.title === "Exit Demo") {
$scope.hideVerticalNav();
}
};
}
]);
</file>
<file name="add_content.html">
<div class="row row-cards-pf">
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status" style="height: 89px;">
<h2 class="card-pf-title" style="height: 17px;">
<span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count">0</span> Ipsum
</h2>
<div class="card-pf-body" style="height: 50px;">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><a href="#" class="add" data-toggle="tooltip" data-placement="top" title="Add Ipsum"><span class="pficon pficon-add-circle-o"></span></a></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status" style="height: 89px;">
<h2 class="card-pf-title" style="height: 17px;">
<a href="#"><span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count">20</span> Amet</a>
</h2>
<div class="card-pf-body" style="height: 50px;">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><a href="#"><span class="pficon pficon-error-circle-o"></span>4</a></span>
<span class="card-pf-aggregate-status-notification"><a href="#"><span class="pficon pficon-warning-triangle-o"></span>1</a></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status" style="height: 89px;">
<h2 class="card-pf-title" style="height: 17px;">
<a href="#"><span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count">9</span> Adipiscing</a>
</h2>
<div class="card-pf-body" style="height: 50px;">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><span class="pficon pficon-ok"></span></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status" style="height: 89px;">
<h2 class="card-pf-title" style="height: 17px;">
<a href="#"><span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count">12</span> Lorem</a>
</h2>
<div class="card-pf-body" style="height: 50px;">
<p class="card-pf-aggregate-status-notifications">
<a href="#"><span class="card-pf-aggregate-status-notification"><span class="pficon pficon-error-circle-o"></span>1</span></a>
</p>
</div>
</div>
</div>
</div>
<div class="row row-cards-pf">
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status card-pf-aggregate-status-mini" style="height: 59px;">
<h2 class="card-pf-title" style="height: 42px;">
<span class="fa fa-rebel"></span>
<span class="card-pf-aggregate-status-count">0</span> Ipsum
</h2>
<div class="card-pf-body" style="height: 24px;">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><a href="#" class="add" data-toggle="tooltip" data-placement="top" title="Add Ipsum"><span class="pficon pficon-add-circle-o"></span></a></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status card-pf-aggregate-status-mini" style="height: 59px;">
<h2 class="card-pf-title" style="height: 42px;">
<a href="#">
<span class="fa fa-paper-plane"></span>
<span class="card-pf-aggregate-status-count">20</span> Amet
</a>
</h2>
<div class="card-pf-body" style="height: 24px;">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><a href="#"><span class="pficon pficon-error-circle-o"></span>4</a></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status card-pf-aggregate-status-mini" style="height: 59px;">
<h2 class="card-pf-title" style="height: 42px;">
<a href="#">
<span class="pficon pficon-cluster"></span>
<span class="card-pf-aggregate-status-count">9</span> Adipiscing
</a>
</h2>
<div class="card-pf-body" style="height: 24px;">
<p class="card-pf-aggregate-status-notifications">
<span class="card-pf-aggregate-status-notification"><span class="pficon pficon-ok"></span></span>
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status card-pf-aggregate-status-mini" style="height: 59px;">
<h2 class="card-pf-title" style="height: 42px;">
<a href="#">
<span class="pficon pficon-image"></span>
<span class="card-pf-aggregate-status-count">12</span> Lorem
</a>
</h2>
<div class="card-pf-body" style="height: 24px;">
<p class="card-pf-aggregate-status-notifications">
<a href="#"><span class="card-pf-aggregate-status-notification"><span class="pficon pficon-error-circle-o"></span>1</span></a>
</p>
</div>
</div>
</div>
</div>
<div class="row row-cards-pf">
<div class="col-xs-12 col-sm-6">
<div class="card-pf" style="height: 360px;">
<div class="card-pf-heading">
<h2 class="card-pf-title" style="height: 17px;">
Top Utilized
</h2>
</div>
<div class="card-pf-body" style="height: 280px;">
<div class="progress-description">
Ipsum
</div>
<div class="progress progress-label-top-right">
<div class="progress-bar progress-bar-danger" role="progressbar"style="width: 95%;" data-toggle="tooltip" title="95% Used">
<span><strong>190.0 of 200.0 GB</strong> Used</span>
</div>
<div class="progress-bar progress-bar-remaining" role="progressbar" style="width: 5%;" data-toggle="tooltip" title="5% Available">
<span class="sr-only">5% Available</span>
</div>
</div>
<div class="progress-description">
Amet
</div>
<div class="progress progress-label-top-right">
<div class="progress-bar progress-bar-success" role="progressbar" style="width: 50%;" data-toggle="tooltip" title="50% Used">
<span><strong>100.0 of 200.0 GB</strong> Used</span>
</div>
<div class="progress-bar progress-bar-remaining" role="progressbar" style="width: 50%;" data-toggle="tooltip" title="50% Available">
<span class="sr-only">50% Available</span>
</div>
</div>
<div class="progress-description">
Adipiscing
</div>
<div class="progress progress-label-top-right">
<div class="progress-bar progress-bar-warning" role="progressbar" style="width: 70%;" data-toggle="tooltip" title="70% Used">
<span><strong>140.0 of 200.0 GB</strong> Used</span>
</div>
<div class="progress-bar progress-bar-remaining" role="progressbar" style="width: 30%;" data-toggle="tooltip" title="30% Available">
<span class="sr-only">30% Available</span>
</div>
</div>
<div class="progress-description">
Lorem
</div>
<div class="progress progress-label-top-right">
<div class="progress-bar progress-bar-warning" role="progressbar" style="width: 76.5%;" data-toggle="tooltip" title="76.5% Used">
<span><strong>153.0 of 200.0 GB</strong> Used</span>
</div>
<div class="progress-bar progress-bar-remaining" role="progressbar" style="width: 23.5%;" data-toggle="tooltip" title="23.5% Available">
<span class="sr-only">23.5% Available</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<div class="card-pf" style="height: 360px;">
<div class="card-pf-heading">
<h2 class="card-pf-title" style="height: 17px;">
Quotas
</h2>
</div>
<div class="card-pf-body" style="height: 280px;">
<div class="progress-container progress-description-left progress-label-right">
<div class="progress-description">
Ipsum
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 25%;" data-toggle="tooltip" title="25% Used">
<span><strong>115 of 460</strong> MHz</span>
</div>
<div class="progress-bar progress-bar-remaining" role="progressbar" style="width: 75%;" data-toggle="tooltip" title="75% Available">
<span class="sr-only">75% Available</span>
</div>
</div>
</div>
<div class="progress-container progress-description-left progress-label-right">
<div class="progress-description">
Amet
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 50%;" data-toggle="tooltip" title="8 GB Used">
<span><strong>8 of 16</strong> GB</span>
</div>
<div class="progress-bar progress-bar-remaining" role="progressbar" style="width: 50%;" data-toggle="tooltip" title="8 GB Available">
<span class="sr-only">50% Available</span>
</div>
</div>
</div>
<div class="progress-container progress-description-left progress-label-right">
<div class="progress-description">
Adipiscing
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 62.5%;" data-toggle="tooltip" title="62.5% Used">
<span><strong>5 of 8</strong> Total</span>
</div>
<div class="progress-bar progress-bar-remaining" role="progressbar" style="width: 37.5%;" data-toggle="tooltip" title="37.5% Available">
<span class="sr-only">37.5% Available</span>
</div>
</div>
</div>
<div class="progress-container progress-description-left progress-label-right">
<div class="progress-description">
Lorem
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 100%;" data-toggle="tooltip" title="100% Used">
<span><strong>2 of 2</strong> Total</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</file>
</example>
*/
|